#pragma once

#include <QtCore/QString>
#include <engine.core/qt_hash.hpp>

#include <boost/operators.hpp>
#include <boost/functional/hash.hpp>

#include "exports.hpp"
#include "Enums.hpp"




namespace Engine
{
	namespace Ui
	{
		struct ENGINE_UI_API StyleIdentifier
			: boost::equality_comparable<StyleIdentifier>
		{
			QString         name;
			Widgets::Type   type;



			/**
			 * Create an empty StyleIdentifier.
			 */
			StyleIdentifier();

			/**
			* Create a StyleIdentifier for a specific name and type.
			*/
			StyleIdentifier(const QString& name, Widgets::Type type);



			/**
			 * Test if this StyleIdentifier is empty.
			 */
			bool isEmpty() const;



			/**
			* Compare this StyleIdentifier to another one.
			*/
			bool operator==(const StyleIdentifier& that) const;

			/**
			 * Compare this StyleIdentifier to another one.
			 */
			bool operator<(const StyleIdentifier& that) const;



			/**
			 * Create a default StyleIdentifier.
			 */
			static StyleIdentifier default_();

			/**
			 * Create a default StyleIdentifier for the given widget type.
			 */
			static StyleIdentifier default_(Widgets::Type type);
		};
		///////////////////////////////////////////////////////////////////////////////////////////////////

		#pragma warning (push)
		//#pragma warning (disable: 4259)
		class ENGINE_UI_API WidgetStyleIdentifier
			: public std::vector<StyleIdentifier>
		{
		public:

			WidgetStyleIdentifier();
			WidgetStyleIdentifier(const StyleIdentifier& that);


			/**
			 * Test if WidgetStyleIdentifier is empty or not.
			 */
			bool isEmpty() const;

			/**
			 * Create a default StyleIdentifier.
			 */
			static WidgetStyleIdentifier default_();

			/**
			 * Create a default StyleIdentifier for the given widget type.
			 */
			static WidgetStyleIdentifier default_(Widgets::Type type);
		};
		///////////////////////////////////////////////////////////////////////////////////////////

		std::size_t ENGINE_UI_API hash_value(const StyleIdentifier& that);
		std::size_t ENGINE_UI_API hash_value(const WidgetStyleIdentifier& that);
	}
	///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////

quint32 ENGINE_UI_API qHash(const Engine::Ui::StyleIdentifier& that);
quint32 ENGINE_UI_API qHash(const Engine::Ui::WidgetStyleIdentifier& that);

#pragma warning (pop)
